<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="description"
	content="Metro, a sleek, intuitive, and powerful framework for faster and easier web development for Windows Metro Style.">
<meta name="keywords"
	content="HTML, CSS, JS, JavaScript, framework, metro, front-end, frontend, web development">
<meta name="author"
	content="Sergey Pimenov and Metro UI CSS contributors">

<link rel='shortcut icon' type='image/x-icon' href='../favicon.ico' />

<title>登录</title>

<link href="${pageContext.request.contextPath }/css/metro.css"
	rel="stylesheet">
<link href="${pageContext.request.contextPath }/css/metro-icons.css"
	rel="stylesheet">
<link
	href="${pageContext.request.contextPath }/css/metro-responsive.css"
	rel="stylesheet">

<script src="${pageContext.request.contextPath }/js/jquery-2.1.3.min.js"></script>
<script src="${pageContext.request.contextPath }/js/metro.js"></script>

<style>
.login-form {
	width: 25rem;
	height: 18.75rem;
	position: fixed;
	top: 50%;
	margin-top: -9.375rem;
	left: 50%;
	margin-left: -12.5rem;
	background-color: #ffffff;
	opacity: 0;
	-webkit-transform: scale(.8);
	transform: scale(.8);
}
</style>

<script>
	/*
	 * Do not use this is a google analytics fro Metro UI CSS
	 * */
	if (window.location.hostname !== 'localhost') {

		(function(i, s, o, g, r, a, m) {
			i['GoogleAnalyticsObject'] = r;
			i[r] = i[r] || function() {
				(i[r].q = i[r].q || []).push(arguments)
			}, i[r].l = 1 * new Date();
			a = s.createElement(o), m = s.getElementsByTagName(o)[0];
			a.async = 1;
			a.src = g;
			m.parentNode.insertBefore(a, m)
		})(window, document, 'script',
				'//www.google-analytics.com/analytics.js', 'ga');

		ga('create', 'UA-58849249-3', 'auto');
		ga('send', 'pageview');

	}
	$(function() {
		var form = $(".login-form");

		form.css({
			opacity : 1,
			"-webkit-transform" : "scale(1)",
			"transform" : "scale(1)",
			"-webkit-transition" : ".5s",
			"transition" : ".5s"
		});
	});
	
	function fanhui(){
		window.location.href="${pageContext.request.contextPath }/jsp/index.jsp";
	}
</script>
</head>
<body class="bg-darkTeal">

	<c:if test="${username!=null }">
		<c:redirect url="/jsp/stuff/index.jsp" />
	</c:if>

	<div class="login-form padding20 block-shadow">
		<form action="${pageContext.request.contextPath }/user/login.action"
			method="post">
			<h1 class="text-light">欢迎进入人事系统</h1>
			<hr class="thin" />
			<br />
			<div class="input-control text full-size" data-role="input">
				<label for="user_login">用户名:</label> <input type="text"
					name="username" id="user_login">
				<button class="button helper-button clear">
					<span class="mif-cross"></span>
				</button>
			</div>
			<br /> <br />
			<div class="input-control password full-size" data-role="input">
				<label for="user_password">密码:</label> <input type="password"
					name="password" id="user_password">
				<button class="button helper-button reveal">
					<span class="mif-looks"></span>
				</button>
			</div>
			<br /> <br />
			<div class="form-actions">
				<button type="submit" class="button primary">登录</button>
				<button type="reset" class="button link">取消</button>
			</div>
		</form>
				<button class="button link" onclick="fanhui()">返回系统首页</button>
	</div>
</body>
</html>